﻿#region  Copyright (C) 2013 Unisys Corporation

// =============================================================================================
// All Rights Reserved. This work contains trade secrets and confidential material of UNISYS, 
// and its use or disclosure in whole or in part without explicit written permission of 
// UNISYS is prohibited. 
//  
// Product Name          :  Unisys e-Workflow and Imaging
// File Name             :  fClasses.cs
// Authored By           :  Unisys Corporation
// =============================================================================================
//	Modified by                         Date            Version
// =============================================================================================
//	ronald.aguilar@cr.unisys.com      May 01, 2013    Initial Version
// =============================================================================================
#endregion

#region Using Region
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Unisys.DuplicateCheck.Entity.Model;

#endregion

namespace TestSplashScreen
{
    public partial class fClasses : Form
    {
        #region Global Resources

        public List<DocClasses> listClass = new List<DocClasses>();
        public DocClasses docClass;

        #endregion


        public fClasses()
        {
            InitializeComponent();
        }

        public fClasses(string[] cls)
        {
            InitializeComponent();
            foreach (string c in cls)
            { dgv_Classes.Rows.Add(c); }
        }
        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (dgv_Classes.RowCount > 1)
            {
                for (int i = 0; i < dgv_Classes.RowCount - 1; i++)
                {
                    docClass = new DocClasses();
                    docClass.Class = dgv_Classes.Rows[i].Cells[0].Value.ToString();
                    listClass.Add(docClass);
                }
                //MessageBox.Show("Clases Documentales guardadas exitosamente");
                this.Close();
            }
            else {
                this.Close();
            }
        }
    }
}
